from django.contrib.auth.models import Permission, ContentType
from rest_framework import serializers


class PermissionSerializer(serializers.ModelSerializer):
    class Meta:
        model = Permission
        fields = '__all__'


class ContentTypeSerializer(serializers.ModelSerializer):
    class Meta:
        """权限类型"""
        model = ContentType
        fields = [
            'id',
            'name',
        ]